﻿Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Request.Params("TagName") = "" Then
            GridView1.DataSourceID = "SqlDataSource1"
        Else
            GridView1.DataSourceID = "SqlDataSource3"
        End If
    End Sub

    Protected Sub btn_tagSearch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_tagSearch.Click
        Dim url As String = "DishByTags.aspx?TagName=" & tb_tagSearch.Text
        Response.Redirect(url)
    End Sub
End Class